/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package th.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "seq_num")
@NamedQueries({
    @NamedQuery(name = "SeqNum.findAll", query = "SELECT s FROM SeqNum s")})
public class SeqNum implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Id    
    @Column(name = "msg_id")
    private String urusan;
    
    @Basic(optional = false)
    @Column(name = "num")
    private int num;

    public SeqNum() {
    }
    
    public SeqNum(String urusan){
        this.urusan = urusan;
    }

    public String getUrusan() {
        return urusan;
    }

    public void setUrusan(String urusan) {
        this.urusan = urusan;
    }   

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (urusan != null ? urusan.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SeqNum)) {
            return false;
        }
        SeqNum other = (SeqNum) object;
        if ((this.urusan == null && other.urusan != null) || (this.urusan != null && !this.urusan.equals(other.urusan))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "th.model.SeqNum[ msgId=" + urusan + " ]";
    }
    
}
